package org.hackystat.ui.chart.jfc.fileresource;

import static org.junit.Assert.assertEquals;

import org.hackystat.ui.chart.jfc.test.UIChartServerApiHelper;
import org.junit.Test;
import org.restlet.data.Method;
import org.restlet.data.Response;
import org.restlet.data.Status;

/**
 * Tests the File Resource.
 *
 * @author Pavel Senin.
 */
public class TestChartFileResource
    extends UIChartServerApiHelper {

  private String testRequest = "/jfcs/file/jfreechart-12434.png";
  // private String testRequest = "jfreechart-12434.png";
  //private String defaultProject = "Default";

  /**
   * Test that GET host/jfcs/file/filename returns an image.
   *
   * @throws Exception If problems occur.
   */
  @Test
  public void getStaticPlot() throws Exception {

    Response rs = this.makeChartFileRequest(Method.GET, testRequest);

    assertEquals("Checking for project data", rs.getStatus(), Status.SUCCESS_OK);
  }

}
